import request from '@/utils/request'

// 查询检测报告列表
export function listReport(query) {
  return request({
    url: '/crop/report/list',
    method: 'get',
    params: query
  })
}

// 查询检测报告详细
export function getReport(reportId) {
  return request({
    url: '/crop/report/' + reportId,
    method: 'get'
  })
}

// 新增检测报告
export function addReport(data) {
  return request({
    url: '/crop/report',
    method: 'post',
    data: data
  })
}

// 修改检测报告
export function updateReport(data) {
  return request({
    url: '/crop/report',
    method: 'put',
    data: data
  })
}

// 删除检测报告
export function delReport(reportId) {
  return request({
    url: '/crop/report/' + reportId,
    method: 'delete'
  })
}

//随机生成检测报告编号
export function selectCheckReportCode() {
  return request({
    url: '/crop/report/selectCheckReportCode',
    method: 'get'
  })
}
